package com.example.designpatterns.behavioral.visitor;

import lombok.extern.slf4j.Slf4j;

/**
 * 客户端代码（具体使用）
 *
 * @author scott
 */
@Slf4j
public class Client {

    public static void main(String[] args) {
        MallProductCollection productCollection = new MallProductCollection();
        productCollection.addProduct(new ElectronicsProduct());
        productCollection.addProduct(new HomeProduct());
        productCollection.addProduct(new ClothingProduct());

        Visitor visitor = new MallManager();
        productCollection.accept(visitor);
    }

}
